package cn.edu.njnu.opengmpback.Modeling.entity;

import cn.edu.njnu.opengmpback.resource.entity.ModelItem;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@Document
public class Project {
    @Id
    @ApiModelProperty(value = "id",hidden = true)
    String id= IdUtil.objectId();

    String name;
    String description;
    String creatorId;
    String creatorName;
    String creatorEmail;
    Boolean publicBoolean;

    String interpreter;

    List<String> keywords = new ArrayList<>();

    List<String> memberList = new ArrayList<>();

    List<String> types = new ArrayList<>();

    String computeModelId = "";
    String logicModelId = "";
    List<String> conceptModelIdList = new ArrayList<>();
    List<String> logicModelIdList = new ArrayList<>();

    @Setter(AccessLevel.NONE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    Date createTime=new Date();
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    Date updateTime=new Date();

    long viewTimes = 0;
}
